.class public Lcom/estrongs/android/pop/app/AudioPlayerService$MediaButtonReceiver;
.super Landroid/content/BroadcastReceiver;
.source "AudioPlayerService.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/estrongs/android/pop/app/AudioPlayerService;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x9
    name = "MediaButtonReceiver"
.end annotation


# static fields
.field static a:Lcom/estrongs/android/pop/app/AudioPlayerService;


# direct methods
.method public constructor <init>()V
    .locals 0

    .line 1
    invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V

    return-void
.end method

.method public static a(Lcom/estrongs/android/pop/app/AudioPlayerService;)V
    .locals 3

    const-string v0, "audio"

    .line 1
    invoke-virtual {p0, v0}, Landroid/app/Service;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/media/AudioManager;

    if-nez v0, :cond_0

    return-void

    .line 2
    :cond_0
    sput-object p0, Lcom/estrongs/android/pop/app/AudioPlayerService$MediaButtonReceiver;->a:Lcom/estrongs/android/pop/app/AudioPlayerService;

    .line 3
    new-instance v1, Landroid/content/ComponentName;

    const-class v2, Lcom/estrongs/android/pop/app/AudioPlayerService$MediaButtonReceiver;

    invoke-direct {v1, p0, v2}, Landroid/content/ComponentName;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    invoke-virtual {v0, v1}, Landroid/media/AudioManager;->registerMediaButtonEventReceiver(Landroid/content/ComponentName;)V

    return-void
.end method

.method public static a()Z
    .locals 1

    .line 4
    sget-object v0, Lcom/estrongs/android/pop/app/AudioPlayerService$MediaButtonReceiver;->a:Lcom/estrongs/android/pop/app/AudioPlayerService;

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    :goto_0
    return v0
.end method

.method public static b(Lcom/estrongs/android/pop/app/AudioPlayerService;)V
    .locals 3

    const-string v0, "audio"

    .line 1
    invoke-virtual {p0, v0}, Landroid/app/Service;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/media/AudioManager;

    if-nez v0, :cond_0

    return-void

    .line 2
    :cond_0
    new-instance v1, Landroid/content/ComponentName;

    const-class v2, Lcom/estrongs/android/pop/app/AudioPlayerService$MediaButtonReceiver;

    invoke-direct {v1, p0, v2}, Landroid/content/ComponentName;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    invoke-virtual {v0, v1}, Landroid/media/AudioManager;->unregisterMediaButtonEventReceiver(Landroid/content/ComponentName;)V

    const/4 p0, 0x0

    .line 3
    sput-object p0, Lcom/estrongs/android/pop/app/AudioPlayerService$MediaButtonReceiver;->a:Lcom/estrongs/android/pop/app/AudioPlayerService;

    return-void
.end method


# virtual methods
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
    .locals 1

    .line 1
    invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;

    move-result-object p1

    const-string v0, "android.intent.action.MEDIA_BUTTON"

    .line 2
    invoke-virtual {v0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p1

    if-nez p1, :cond_0

    return-void

    .line 3
    :cond_0
    sget-object p1, Lcom/estrongs/android/pop/app/AudioPlayerService$MediaButtonReceiver;->a:Lcom/estrongs/android/pop/app/AudioPlayerService;

    if-nez p1, :cond_1

    return-void

    :cond_1
    const-string p1, "android.intent.extra.KEY_EVENT"

    .line 4
    invoke-virtual {p2, p1}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;

    move-result-object p1

    check-cast p1, Landroid/view/KeyEvent;

    .line 5
    invoke-virtual {p1}, Landroid/view/KeyEvent;->getAction()I

    move-result p2

    const/4 v0, 0x1

    if-eq p2, v0, :cond_2

    return-void

    .line 6
    :cond_2
    invoke-virtual {p1}, Landroid/view/KeyEvent;->getKeyCode()I

    move-result p1

    const/16 p2, 0x4f

    if-eq p1, p2, :cond_8

    const/16 p2, 0x7e

    if-eq p1, p2, :cond_6

    const/16 p2, 0x7f

    if-eq p1, p2, :cond_5

    packed-switch p1, :pswitch_data_0

    goto/16 :goto_0

    .line 7
    :pswitch_0
    sget-object p1, Lcom/estrongs/android/pop/app/AudioPlayerService$MediaButtonReceiver;->a:Lcom/estrongs/android/pop/app/AudioPlayerService;

    invoke-virtual {p1}, Lcom/estrongs/android/pop/app/AudioPlayerService;->m()I

    move-result p2

    invoke-virtual {p1, p2}, Lcom/estrongs/android/pop/app/AudioPlayerService;->a(I)Z

    goto/16 :goto_0

    .line 8
    :pswitch_1
    sget-object p1, Lcom/estrongs/android/pop/app/AudioPlayerService$MediaButtonReceiver;->a:Lcom/estrongs/android/pop/app/AudioPlayerService;

    const/4 p2, 0x0

    invoke-static {p1, p2}, Lcom/estrongs/android/pop/app/AudioPlayerService;->a(Lcom/estrongs/android/pop/app/AudioPlayerService;Landroid/media/MediaPlayer;)Z

    goto :goto_0

    .line 9
    :pswitch_2
    sget-object p1, Lcom/estrongs/android/pop/app/AudioPlayerService$MediaButtonReceiver;->a:Lcom/estrongs/android/pop/app/AudioPlayerService;

    invoke-virtual {p1}, Lcom/estrongs/android/pop/app/AudioPlayerService;->F()V

    goto :goto_0

    .line 10
    :pswitch_3
    sget-object p1, Lcom/estrongs/android/pop/app/AudioPlayerService$MediaButtonReceiver;->a:Lcom/estrongs/android/pop/app/AudioPlayerService;

    invoke-virtual {p1}, Lcom/estrongs/android/pop/app/AudioPlayerService;->u()Z

    move-result p1

    if-eqz p1, :cond_4

    .line 11
    sget-object p1, Lcom/estrongs/android/pop/app/AudioPlayerService$MediaButtonReceiver;->a:Lcom/estrongs/android/pop/app/AudioPlayerService;

    invoke-virtual {p1}, Lcom/estrongs/android/pop/app/AudioPlayerService;->t()Z

    move-result p1

    if-eqz p1, :cond_3

    .line 12
    sget-object p1, Lcom/estrongs/android/pop/app/AudioPlayerService$MediaButtonReceiver;->a:Lcom/estrongs/android/pop/app/AudioPlayerService;

    invoke-virtual {p1}, Lcom/estrongs/android/pop/app/AudioPlayerService;->C()V

    goto :goto_0

    .line 13
    :cond_3
    sget-object p1, Lcom/estrongs/android/pop/app/AudioPlayerService$MediaButtonReceiver;->a:Lcom/estrongs/android/pop/app/AudioPlayerService;

    invoke-virtual {p1}, Lcom/estrongs/android/pop/app/AudioPlayerService;->w()V

    goto :goto_0

    .line 14
    :cond_4
    sget-object p1, Lcom/estrongs/android/pop/app/AudioPlayerService$MediaButtonReceiver;->a:Lcom/estrongs/android/pop/app/AudioPlayerService;

    invoke-virtual {p1}, Lcom/estrongs/android/pop/app/AudioPlayerService;->x()Z

    goto :goto_0

    .line 15
    :cond_5
    sget-object p1, Lcom/estrongs/android/pop/app/AudioPlayerService$MediaButtonReceiver;->a:Lcom/estrongs/android/pop/app/AudioPlayerService;

    invoke-virtual {p1}, Lcom/estrongs/android/pop/app/AudioPlayerService;->w()V

    goto :goto_0

    .line 16
    :cond_6
    sget-object p1, Lcom/estrongs/android/pop/app/AudioPlayerService$MediaButtonReceiver;->a:Lcom/estrongs/android/pop/app/AudioPlayerService;

    invoke-virtual {p1}, Lcom/estrongs/android/pop/app/AudioPlayerService;->u()Z

    move-result p1

    if-eqz p1, :cond_7

    .line 17
    sget-object p1, Lcom/estrongs/android/pop/app/AudioPlayerService$MediaButtonReceiver;->a:Lcom/estrongs/android/pop/app/AudioPlayerService;

    invoke-virtual {p1}, Lcom/estrongs/android/pop/app/AudioPlayerService;->t()Z

    move-result p1

    if-eqz p1, :cond_a

    .line 18
    sget-object p1, Lcom/estrongs/android/pop/app/AudioPlayerService$MediaButtonReceiver;->a:Lcom/estrongs/android/pop/app/AudioPlayerService;

    invoke-virtual {p1}, Lcom/estrongs/android/pop/app/AudioPlayerService;->C()V

    goto :goto_0

    .line 19
    :cond_7
    sget-object p1, Lcom/estrongs/android/pop/app/AudioPlayerService$MediaButtonReceiver;->a:Lcom/estrongs/android/pop/app/AudioPlayerService;

    invoke-virtual {p1}, Lcom/estrongs/android/pop/app/AudioPlayerService;->x()Z

    goto :goto_0

    .line 20
    :cond_8
    sget-object p1, Lcom/estrongs/android/pop/app/AudioPlayerService$MediaButtonReceiver;->a:Lcom/estrongs/android/pop/app/AudioPlayerService;

    invoke-virtual {p1}, Lcom/estrongs/android/pop/app/AudioPlayerService;->u()Z

    move-result p1

    if-eqz p1, :cond_a

    .line 21
    sget-object p1, Lcom/estrongs/android/pop/app/AudioPlayerService$MediaButtonReceiver;->a:Lcom/estrongs/android/pop/app/AudioPlayerService;

    invoke-virtual {p1}, Lcom/estrongs/android/pop/app/AudioPlayerService;->t()Z

    move-result p1

    if-eqz p1, :cond_9

    .line 22
    sget-object p1, Lcom/estrongs/android/pop/app/AudioPlayerService$MediaButtonReceiver;->a:Lcom/estrongs/android/pop/app/AudioPlayerService;

    invoke-virtual {p1}, Lcom/estrongs/android/pop/app/AudioPlayerService;->C()V

    goto :goto_0

    .line 23
    :cond_9
    sget-object p1, Lcom/estrongs/android/pop/app/AudioPlayerService$MediaButtonReceiver;->a:Lcom/estrongs/android/pop/app/AudioPlayerService;

    invoke-virtual {p1}, Lcom/estrongs/android/pop/app/AudioPlayerService;->w()V

    :cond_a
    :goto_0
    return-void

    nop

    :pswitch_data_0
    .packed-switch 0x55
        :pswitch_3
        :pswitch_2
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method
